onRightClick Event

Description

Fires when the user right clicks a row in the List control.

Discussion

The onRightClick event is triggered when the user right clicks on a row in the List. Your code can reference arguments[0], a zero based index of the row that was right clicked. In addition the Javascript can reference the 'this' scope, which is a pointer to the List object. For example, to set focus to the row the user clicked on:

// Set the focus to the clicked row:
this.setValue(arguments[0]);

Displaying the System Right-Click Context Menu

If you right-click on a List control, the system right-click menu may not be shown. If you would like the right-click menu to be displayed, add the following JavaScript at the end of the JavaScript for the onRightClick event:

return true;

See Also